package com.sun.service.impl;

import com.sun.annotation.WR;
import com.sun.mapper.FrendMapper;
import com.sun.pojo.Friend;
import com.sun.service.FriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lk
 * @version 1.0.0
 * @Description TODO
 * @createTime 2025/9/18 11:19
 */
@Service
public class FriendServiceImpl implements FriendService {

    @Autowired
    private FrendMapper frendMapper;

    @Override
    @WR("R") // 库2
    public List<Friend> list() {
        return frendMapper.selectList(null);
    }

    @Override
    @WR("W") // 库1
    public void save(Friend friend) {
        frendMapper.insert(friend);
    }
}
